package chessboard;

import java.awt.Color;

public class ChessMan {
	
	Type type;
	Color color;
	public static int [] GRABHEIGHT = new int []{50,14,14,8,13,1,10};
	public static double [] GRABWIDTH = new double []{23,15,15,22,12,23,14};
	int height;
	double width;

	

	public ChessMan(Type type, Color color) {
		this.type = type;
		this.color = color;
		this.height = GRABHEIGHT[type.getNumber()];
		this.width = GRABWIDTH[type.getNumber()];
		
		
	}



	public Type getType() {
		return type;
	}



	public Color getColor() {
		return color;
	}
	
	public String toString(){
		char c = ' ';
		switch(color.getRed()){
		case 0:
			c = 'B';
			break;
		case 128:
			c = 'G';
			break;
		case 255:
			c = 'W';
			break;
		default:
			break;
		
		}
		return c + "-" + type;
	}

}
